package org.metasketch.demo.model;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.metasketch.model.CommonDoubleIdentified;

import com.thoughtworks.xstream.annotations.XStreamAlias;
import com.thoughtworks.xstream.annotations.XStreamAsAttribute;


@XStreamAlias("actor-role")
public class ActorRole extends CommonDoubleIdentified {

	@XStreamAsAttribute
	boolean composite = false;
	
	//by id
	@XStreamAlias("contained-actor-roles")
	Set<ActorRole> containedActorRoles = new HashSet<ActorRole>();

	//by id
	Set<TransactionKind> initiates = new HashSet<TransactionKind>();
	
	//by id
	Set<TransactionKind> executes = new HashSet<TransactionKind>();

	@XStreamAsAttribute
	@XStreamAlias("assigned-to")
	OrganizationalUnit assignedTo;

	public boolean isComposite() {
		return composite;
	}

	public void setComposite(boolean composite) {
		this.composite = composite;
	}

	public Set<ActorRole> getContainedActorRoles() {
		return containedActorRoles;
	}

	public void setContainedActorRoles(Set<ActorRole> containedActorRoles) {
		this.containedActorRoles = containedActorRoles;
	}

	public Set<TransactionKind> getInitiates() {
		return initiates;
	}

	public void setInitiates(Set<TransactionKind> initiate) {
		this.initiates = initiate;
	}

	public Set<TransactionKind> getExecutes() {
		return executes;
	}

	public void setExecutes(Set<TransactionKind> execute) {
		this.executes = execute;
	}

	public OrganizationalUnit getAssignedTo() {
		return assignedTo;
	}

	public void setAssignedTo(OrganizationalUnit assignedTo) {
		this.assignedTo = assignedTo;
	}

}
